using System;
using AntEater.ComponentModel.Validation;
using System.ComponentModel;
using System.Collections.ObjectModel;

namespace AntEater.ComponentModel.BuildElements
{
    /// <summary>
    /// Provides the Choose build element.
    /// </summary>
    [Serializable]
    [BuildElement("Choose")]
    [ChildBuildElementType(typeof(WhenBuildElement), IsRequired=true)]
    [ChildBuildElementType(typeof(OtherwiseBuildElement),MaxCount=1)]
    [Icon(typeof(ChooseBuildElement),"AntEater.ComponentModel.Resources.Choose.ico")]
    public class ChooseBuildElement : ContainerBuildElementBase
    {

        /// <summary>
        /// Initializes a new instance of the <see cref="T:ChooseBuildElement"/> class.
        /// </summary>
        /// <param name="context">The context.</param>
        public ChooseBuildElement(BuildFileDefinition context)
            : base(context) {
        }

        /// <summary>
        /// Determines whether this instance is valid.
        /// </summary>
        /// <value></value>
        /// <returns>
        /// 	<c>true</c> if this instance is valid; otherwise, <c>false</c>.
        /// </returns>
        public override bool IsValid {
            get { throw new NotImplementedException(); }
        }

        /// <summary>
        /// Validates the specified recursive.
        /// </summary>
        /// <param name="recursive">if set to <c>true</c> [recursive].</param>
        /// <returns></returns>
        public override ReadOnlyCollection<ValidationResult> Validate(bool recursive) {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Creates a new object that is a copy of the current instance.
        /// </summary>
        /// <returns>
        /// A new object that is a copy of this instance.
        /// </returns>
        public override object Clone() {
            ChooseBuildElement newElement = base.Clone() as ChooseBuildElement;

            return newElement;
        }
    }
}
